In recent information processing systems, a non-volatile memory (NVM) is sometimes used as an auxiliary storage device or a storage. This non-volatile memory is roughly divided into a flash memory compatible with data access with a large size as a unit and a non-volatile random access memory (NVRAM: non-volatile RAM) capable of high speed random access in a small unit. Here, a NAND type flash memory can be cited as a representative example of the flash memory. Meanwhile, examples of the non-volatile random access memory include a resistive RAM (ReRAM), a phase-change RAM (PCRAM), and a magnetoresistive RAM (MRAM).
In some of these non-volatile memories, a data holding characteristic when holding a logical value “0” are different from a data holding characteristic when holding a logical value “1”. This data holding characteristic is also called retention. A memory controller that performs predetermined conversion processing (inversion or the like) on user data such that the number of “1” becomes fewer in a case where the data holding characteristic (retention) of the logical value “0” is better has been proposed (for example, refer to Patent Document 1). This memory controller adds, to the user data, a parity for detecting an error in the user data after the conversion processing to write to a memory cell.